#ifndef _DPL_CONTROLLER_H_
#define _DPL_CONTROLLER_H_

#include <cstdint>
#include <string>
#include <vector>
#include "render.h"

extern "C" {
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
}

namespace dpl {

class IController
{
public:
    virtual ~IController() {};

    virtual int Open(std::string &filename) = 0;
    virtual int Close() = 0;

    virtual int Play() = 0;
    virtual int Pause() = 0;
    virtual int Stop() = 0;

    virtual int Duration(AVRational* base, int64_t* dur) = 0;
    virtual int Seek(int64_t pos) = 0;

    virtual int GetStreamInfos(std::vector<AVCodecParameters*> &stream_infos) = 0;
    virtual int AddRender(int index, IRender* render) = 0;
};

extern int CreateController(IController* c);

}

#endif
